﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BusinessComponents;

namespace WaterfrontLodge.WebForms.RoomTypeMgt
{
    public abstract partial class RoomTypeAddController : System.Web.UI.Page
    {
        //protected void Page_Load(object sender, EventArgs e)
        //{

        //}

        protected void reset()
        {
            Session["Room_Type_Transfer_Object"] = new RoomType();
        }

        protected RoomType getRoomTypeTransferObject()
        {
            RoomType rt = Session["Room_Type_Transfer_Object"] as RoomType;

            if (rt == null)
            {
                rt = new RoomType();
                Session["Room_Type_Transfer_Object"] = rt;
            }

            return rt;
        }

        protected string getNextView(){
            switch (getCurView())
            {
                case "RoomTypeAdd1": return "~/WebForms/RoomType/RoomTypeAdd2.aspx";
                case "RoomTypeAdd2": return "~/WebForms/RoomType/RoomTypeAdd3.aspx";
                case "RoomTypeAdd3": return "~/WebForms/Shared/RoomTypeView.aspx";
                default: return "";
            }
        }

        protected abstract string getCurView();
    }
}